package ThreadPool.lagou.concurrent.demo01;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description: 线程从new态变为runnable态
 * @date 2022/5/23 20:55
 */
public class Mythread extends Thread {
    @Override
    public void run() {
        for (int i = 1; i <= 10; i++) {

            System.out.println("我是线程-"+i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        Mythread mythread = new Mythread();
        mythread.start();
        mythread.join();
        System.out.println(Thread.currentThread().getName());
    }
}
